package com.ly.heart.service.impl;

import java.util.List;
import com.ly.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.PlanCollectingNodeEntityMapper;
import com.ly.heart.domain.PlanCollectingNodeEntity;
import com.ly.heart.service.IPlanCollectingNodeEntityService;

/**
 * 计划回款时间节点，关联回款计划Service业务层处理
 *
 * @author cxl
 * @date 2024-05-14
 */
@Service
public class PlanCollectingNodeEntityServiceImpl implements IPlanCollectingNodeEntityService
{
    @Autowired
    private PlanCollectingNodeEntityMapper planCollectingNodeEntityMapper;

    /**
     * 查询计划回款时间节点，关联回款计划
     *
     * @param id 计划回款时间节点，关联回款计划主键
     * @return 计划回款时间节点，关联回款计划
     */
    @Override
    public PlanCollectingNodeEntity selectPlanCollectingNodeEntityById(String id)
    {
        return planCollectingNodeEntityMapper.selectPlanCollectingNodeEntityById(id);
    }

    /**
     * 查询计划回款时间节点，关联回款计划列表
     *
     * @param planCollectingNodeEntity 计划回款时间节点，关联回款计划
     * @return 计划回款时间节点，关联回款计划
     */
    @Override
    public List<PlanCollectingNodeEntity> selectPlanCollectingNodeEntityList(PlanCollectingNodeEntity planCollectingNodeEntity)
    {
        return planCollectingNodeEntityMapper.selectPlanCollectingNodeEntityList(planCollectingNodeEntity);
    }

    /**
     * 新增计划回款时间节点，关联回款计划
     *
     * @param planCollectingNodeEntity 计划回款时间节点，关联回款计划
     * @return 结果
     */
    @Override
    public int insertPlanCollectingNodeEntity(PlanCollectingNodeEntity planCollectingNodeEntity)
    {
        planCollectingNodeEntity.setCreateTime(DateUtils.getNowDate());
        return planCollectingNodeEntityMapper.insertPlanCollectingNodeEntity(planCollectingNodeEntity);
    }

    /**
     * 修改计划回款时间节点，关联回款计划
     *
     * @param planCollectingNodeEntity 计划回款时间节点，关联回款计划
     * @return 结果
     */
    @Override
    public int updatePlanCollectingNodeEntity(PlanCollectingNodeEntity planCollectingNodeEntity)
    {
        return planCollectingNodeEntityMapper.updatePlanCollectingNodeEntity(planCollectingNodeEntity);
    }

    /**
     * 批量删除计划回款时间节点，关联回款计划
     *
     * @param ids 需要删除的计划回款时间节点，关联回款计划主键
     * @return 结果
     */
    @Override
    public int deletePlanCollectingNodeEntityByIds(String[] ids)
    {
        return planCollectingNodeEntityMapper.deletePlanCollectingNodeEntityByIds(ids);
    }

    /**
     * 删除计划回款时间节点，关联回款计划信息
     *
     * @param id 计划回款时间节点，关联回款计划主键
     * @return 结果
     */
    @Override
    public int deletePlanCollectingNodeEntityById(String id)
    {
        return planCollectingNodeEntityMapper.deletePlanCollectingNodeEntityById(id);
    }
}
